package com.zzyl.nursing.controller.member;

import com.zzyl.common.config.WxConfig;
import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.R;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.dto.UserRequestLoginDto;
import com.zzyl.nursing.service.IWeChatService;
import com.zzyl.nursing.vo.UserRequestLoginVo;
import com.zzyl.serve.domain.NursingProject;
import com.zzyl.serve.service.INursingProjectService;
import com.zzyl.common.core.domain.AjaxResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description WechatController
 * @Author cangyue
 * @Date 2025-07-18
 */
@RestController
@RequestMapping("/member/orders/project")
@Api(tags = "会员项目接口")
public class WechatController extends BaseController {
    private static final Logger log = LoggerFactory.getLogger(WechatController.class);
    
    @Autowired
    private INursingProjectService nursingProjectService;

    @GetMapping("/page")
    @ApiOperation("分页查询")
    public TableDataInfo<NursingProject> page(NursingProject nursingProject) {
        startPage();
        List<NursingProject> list = nursingProjectService.selectNursingProjectList(nursingProject);
        return getDataTable(list);
    }

    /**
     * 根据编号查询护理项目信息
     */
    @GetMapping("/{id}")
    @ApiOperation("根据编号查询护理项目信息")
    public R<NursingProject> getProjectById(@ApiParam(value = "护理项目ID", required = true) @PathVariable("id") Long id) {
        NursingProject nursingProject = nursingProjectService.selectNursingProjectById(id);
        return R.ok(nursingProject);
    }
    

    
}
